package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.CheckGroup;
import com.itheima.pojo.User;

import java.util.List;
import java.util.Map;

public interface UserDao {
    public User findByUsername(String username);

    //新增用户
    void add(User user);
    //设置用户与角色的关联信息
    void setUserAndRole(Map<String, Integer> map);
    //分页查询
    public Page<User> findByCondition(String queryString);

    User findById(Integer id);

    void edit(User user);

    void deleteAssociation(Integer userId);

    List<User> findAll();

    void deleteById(Integer id);

    int findCount();

    List<Integer> findRoleIdsByUserId(Integer roleId);
}
